package com.xxx.springboot.service;

import com.alicp.jetcache.anno.CacheType;
import com.alicp.jetcache.anno.Cached;
import com.xxx.springboot.pojo.entity.User;
import com.xxx.springboot.pojo.vo.UserExportVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * demo service 接口
 */
public interface DemoService {

	/**
	 * 测试JTA分布式事务
	 */
	int testJTA();

	/**
	 * 根据用户名查询
	 * @param username
	 * @return
	 */
	@Cached(cacheType = CacheType.LOCAL, expire = 60)
	User getByName(String username);

	/**
	 * easy poi 导入excel
	 * @param file
	 */
    String importExcelByEasyPoi(MultipartFile file) throws Exception;

	List<UserExportVO> exportExcelByEasyPoi();
}
